package com.qujia.station.mapper;


import com.qujia.station.domain.ClassSettlementCard;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 电子卡班结Mapper接口
 * 
 * @author qujia
 * @date 2022-04-19
 */
@Repository
public interface ClassSettlementCardMapper 
{
    /**
     * 查询电子卡班结
     * 
     * @param id 电子卡班结ID
     * @return 电子卡班结
     */
    public ClassSettlementCard selectClassSettlementCardById(Long id);

    /**
     * 查询电子卡班结列表
     * 
     * @param classSettlementCard 电子卡班结
     * @return 电子卡班结集合
     */
    public List<ClassSettlementCard> selectClassSettlementCardList(ClassSettlementCard classSettlementCard);

    public List<ClassSettlementCard> selectClassReportCardList(ClassSettlementCard classSettlementCard);



    public List<ClassSettlementCard> queryGroupByPayTypeForOrder(ClassSettlementCard classSettlementCard);

    public List<ClassSettlementCard> queryGroupByPayType(ClassSettlementCard classSettlementCard);

    public List<ClassSettlementCard> queryGroupByCardType(ClassSettlementCard classSettlementCard);

    public List<ClassSettlementCard> queryGroupByCardTypeForOrder(ClassSettlementCard classSettlementCard);

    public List<ClassSettlementCard> queryGroupByRechargeCardType(ClassSettlementCard classSettlementCard);

    public List<ClassSettlementCard> queryGroupByRechargeCardTypeForOrder(ClassSettlementCard classSettlementCard);

    /**
     * 新增电子卡班结
     * 
     * @param classSettlementCard 电子卡班结
     * @return 结果
     */
    public int insertClassSettlementCard(ClassSettlementCard classSettlementCard);


    /**
     * 新增电子卡日报表
     *
     * @param classSettlementCard 电子卡日报表
     * @return 结果
     */
    public int insertClassReportCard(ClassSettlementCard classSettlementCard);

    /**
     * 修改电子卡班结
     * 
     * @param classSettlementCard 电子卡班结
     * @return 结果
     */
    public int updateClassSettlementCard(ClassSettlementCard classSettlementCard);

    /**
     * 删除电子卡班结
     * 
     * @param id 电子卡班结ID
     * @return 结果
     */
    public int deleteClassSettlementCardById(Long id);

    /**
     * 批量删除电子卡班结
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteClassSettlementCardByIds(Long[] ids);

    public int deleteClassSettlementByClassNos(String[] classNo);

    public int deleteOilByClassNos(String[] classNo);

    public int deleteReportByClassNos(String[] classNo);

    public int deleteOilOmeterByClassNos(String[] classNo);

    public List<ClassSettlementCard> queryUntreatedData(Map<String, Object> params);

    public List<ClassSettlementCard> queryUntreatedDataSum(Map<String, Object> params);

    public ClassSettlementCard querySumCz(Map<String, Object> params);

    List<ClassSettlementCard> sumDzkRechargeRefund(@Param("stationId") Long stationId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

}
